home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Games / Commercial / Outland Backstab / Backstab / Backstab.rsrc / TEXT_128.txt < prev    next >
Text File  |  1994-04-13  |  10KB  |  90 lines

  1.          Backstab
  2.  
  3. Copyright ¬©1992 Adam Miller
  4. This program may not be commercially distributed without my written permission.
  5.  
  6.     Welcome to Backstab.  As you play Backstab, you may suspect that you've seen versions of this game before.  You're probably right.  It's a simple board game, although much harder to play than it first appears.  I wrote another version of this game because I felt that it was important to contain features that the other versions lacked.  My version has animated graphics, both color and black and white, digitized sound, a scoreboard, and expandability: the ability to add new boards and computer players to this program.
  7.  
  8. How to Play the Game
  9.  
  10.     The rules are very simple.  You are either red or blue (black or white) and your object is to finish the game with more pieces than your opponent.
  11.     The board is seven squares across by seven squares tall.  A square can either be empty, have a piece in it, or have a barrier.    Each turn you can move one piece.  It can move up to two squares in any direction, and can jump over other pieces at will.  If the piece you move only moves within a one square radius, then the original piece is left behind as well as a new piece appearing in the square you moved to.  You get an extra piece this way.  If you moved two squares, then the original piece doesn't stay.  It's just changes the position of your piece.
  12.     All of your opponents pieces in the squares that surround the square you moved into become yours.  You can accumulate pieces quickly this way.
  13.     It is possible to reach a position where a player has no available moves.  In this case, the player loses his or her (or its) turn.  Otherwise, passing a turn is not allowed.
  14.     The rules are simple, but it‚Äôs a hard game to master.
  15.  
  16. Choosing an Opponent
  17.  
  18.     There are two menus that control who or what is playing the game.  If you‚Äôre running the game in black and white, the menus are Black and White.  If you‚Äôre in color, they‚Äôre Red and Blue.  These menus are identical in content.  The first option is Human.  If you want the given player to be controlled by a person using the computer, choose this option.
  19.     The other items in the menu are computer players.  These are the computer players that have been installed into the program (more on that later).  The ones I have written myself are: Moronic, Suicidal, Awful, Stupid, Below Average, Average, and Pretty Good.
  20.     I suggest playing on Awful at the beginning.  Then move up to Stupid, and then to Below Average, and then to Average.
  21.     If you‚Äôve never played before, Awful will be a great challenge for a while.  If you get tired of being beaten, then you can try switching to Suicidal level.  You should be able to overcome this one.
  22.     I consider myself a good Backstab player.  I win on Average maybe one in four times.  I‚Äôve never won on Pretty Good.
  23.  
  24. Choosing a Board
  25.  
  26.     I suggest playing without a board most of the time, i.e., under the ‚ÄúStandard‚Äù option.  The game works better that way.  Still, I have included different boards to be complete and to give you some variation.
  27.     I‚Äôve concocted around fifteen different boards.  They start out relatively mundane, but get increasingly strange as you move down the menu.  Try ‚Äòem out.  The computer players usually don‚Äôt play as well with a different board.
  28.  
  29. Backstab‚Äôs Drawbacks, Bugs, and Problems
  30.  
  31. Options
  32.  
  33.     Most of the options are self-explanatory, but an option named ‚ÄúFastplay‚Äù which resides in the File menu, needs some explanation.  Unless you‚Äôre making your own computer players (which I‚Äôll get into later on), you probably don‚Äôt need this option.  What it does is to remove all the effects from the game: sound, animation, and alerts.  The result is to play out games as quickly as possible.  Also, after a game finishes, another one is immediately begun, without a pause or waiting for user input.  The point of this option is to allow computer players to play against each other many times, and then to look at the win totals.
  34.  
  35. Making your own Boards
  36.  
  37.     This is really easy, assuming you have a resource editor.  The boards are stored as resources of type ‚ÄòBord‚Äô.  Their ID‚Äôs don‚Äôt have to be numbered consecutively or anything like that.  Just add resources and the new boards will appear in the Board menu.  It‚Äôs as simple as that.
  38.     A ‚ÄòBord‚Äô resource consists of a list of indeterminate length of the things which start out on the board.  The format for each resource is a list squares, each of which containing the following data:
  39.  
  40. Occupier: what is in the square, 0 = barrier, 1 = player 1, and 2 = player 2
  41. H-Coordinate: the horizontal position of the square
  42. V-Coordinate: the vertical position of the square
  43.  
  44.     For example, to make a board consisting solely of a barrier piece in the upper right hand corner, your list would be only one item long and would look like this:
  45.  
  46. Occupier = 0
  47. H-Coordinate = 7
  48. V-Coordinate = 1
  49.  
  50.     As you can see with some of the boards I‚Äôve created, there are no limits as to what boards you can create.  Pieces don‚Äôt have to start in the traditional corners.  All players are not necessarily created equal.
  51.     I, Adam Miller, hereby encourage you to make your own boards as you see fit.  If you produce any as cool as mine, send ‚Äòem to me.
  52.  
  53. Me
  54.  
  55.     I encourage correspondence from you.  Do you like Backstab?  Do you have any suggestions?  And please, please, don‚Äôt be afraid to write to simply tell me you like this game.  It never hurts.
  56.     I spent a lot of time writing this game, and it‚Äôd be dandy if you‚Äôd send me a few bucks if you use it.  I would especially like to see any computer players you write.  Money‚Äôd be better.  Nah, I‚Äôd prefer players.  No, money.  Players.  Money . . . BOTH (would be nice).
  57.     Source code is $15.  It‚Äôs pretty neat.  Written in THINK Pascal.  Documented.  Lots of interface stuff, plus neat stuff like calling the computer players.  Send an initialized disk and a SASE.  I can‚Äôt send it electronically at this point.  The source code is very useful in developing your own computer players, as you can run them from the project and thus have access to runtime debugging from THINK Pascal.
  58.     My address is:
  59.  
  60. Adam Miller
  61. P.O. Box 1156
  62. Yale Station
  63. New Haven, CT 06520
  64.  
  65.     Electronically, it‚Äôs:
  66.  
  67. AMiller@YaleVM.YCC.Yale.edu
  68.  
  69. Making your own Computer Players
  70.  
  71.     This is the fun stuff.  This is what makes my version of this game truly different.  It is possible, and, in fact, extremely easy, to write your own computer players.  This section is only for programmers, so if you‚Äôre simply a user of Backstab, you don‚Äôt have to bother to read this.  However, it is very easy to write your own players -- you don‚Äôt need to be a programming genius to do it.
  72.     The way it works is simple: you compile a computer player into a code resource of type ‚ÄòPLYR‚Äô, and insert this code resource into the resource fork of Backstab, with the resource name set to the name you want your player to have.  (Again, the ID doesn‚Äôt have to be specially numbered.)  Backstab will then automatically insert your computer player into the menu list, and you‚Äôre ready to play.
  73.     The great thing about writing computer players is that they don‚Äôt have to do anything but return a move to Backstab.  It‚Äôs very easy.  I have added this capability to Backstab for all those people out there that always thought it would be neat to write your own computer player, but never wanted to write the game along with it.  In Backstab, the game is already written in a good implementation.
  74.     Obviously, computer players can be written in any language.  My language of choice is THINK Pascal, and this is what I‚Äôve used to write Backstab and the computer players that come with it.  I have included sample source files for your convenience, written in THINK Pascal.  The ones I have included are the sources of Moronic and Stupid.  If someone would send me the C or assembly or whatever code of a player that they have written, that would be great, and I can include it in future versions of Backstab.
  75.     I will now give instructions on creating a project in THINK Pascal for compiling computer players.  Create a new project.  Set the project type to Code Resource, with the resource type to ‚ÄòPLYR‚Äô with no attributes.  The files in the project should be the Interface.lib, either the DRVRRuntime.lib or the RSRCRuntime.lib, and your pascal source file.  It‚Äôs then ready to compile.
  76.     If you want to include any other resources, that‚Äôs fine.  The resource fork of Backstab will be current when your computer player is called.  None of my own computer players uses resources, but that‚Äôs just me.
  77.     The parameters passed to the computer file are as follows:
  78.  
  79. procedure Main (Board: BordType; CurPlayer: integer; var Origin, Move: point);
  80.  
  81.     A variable of BordType is defined thus:
  82.  
  83. BordType = array[1..7, 1..7] of byte
  84.  
  85.     The Board is the current board in the game.  The CurPlayer is either one or two, Red/Black being player one.  Origin and Move are the two parameters for the move.  Origin is where the move starts, and Move is where the piece moves to.
  86.     Make sure that you dispose of all dynamic variables that you use.
  87.     Look at the files that I‚Äôve provided as demos.  They should help you a lot.
  88.     When your computer player is called from Backstab, it gives you a very limited form of debugging: if the computer attempts an illegal move, it tells you, and tells you from where to where it tried to move.
  89.     I have written a bunch of computer players, and a couple of them are decent at the game.  My methods were basically a multi-ply search.  It happens to be very effective in this game.  However, my players do suffer numerous short-comings, especially in letting themselves be wiped out at the beginning of the game.  There is a lot of room for improvement, and you are the one to do it.  Maybe a computer player with strategy, or perhaps one that learns?  Send me what you make.  See if you can write one that beats Pretty Good.
  90.     Good luck.